package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.query.AttentionQueryObject;
import cn.wolfcode.trip.base.query.QueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface IUserService {

    void saveOrUpdate(User user);

    /**
     * 根据邮箱密码 查出是否存在此用户
     * @param email
     * @param password
     * @return
     */
    Object login(String email, String password);

    /**
     * 查询所有用户
     * @param qo
     * @return
     */
    PageInfo<User> query(QueryObject qo);

    /**
     * 根据用户id查询该用户
     * @param id
     * @return
     */
    User getUserByParamKey(Long id);

    Boolean selectByCompanionId(Long companionId);

    List<User> selectAll();


    List<User> selectByEmailAndNickName(String str);

    Integer selectAttention(AttentionQueryObject qo);

    int changeAttention(Long attentionuserId, Long beattentionuserId);

    int getFansNum(Long userId);
}
